<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>移动端_视觉视口</title>
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			#root{
				width: 980px;
				height: 300px;
				background-color: skyblue;
				font-size: 40px;
			}
		</style>
	</head>
	<body>
		<div id="root">
			
		</div>
		<script type="text/javascript" >
			console.log('设备的布局视口宽度为：',document.documentElement.clientWidth)
			console.log('设备的视觉视口宽度为：',window.innerWidth)
			const root = document.getElementById('root')
			root.innerHTML = '设备的布局视口宽度为：'+document.documentElement.clientWidth+'<br/>'
			root.innerHTML += '设备的视觉视口宽度为：'+window.innerWidth
		</script>
	</body>
</html>